package util;

import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;

import java.util.Optional;

public class AlertUtil {
    public static Optional<ButtonType> alert(Alert.AlertType type, String title, String contentText, ButtonType... buttonTypes) {
        Alert alert = new Alert(type, contentText, buttonTypes);
        alert.setTitle(title);
        alert.setHeaderText(null);
        return alert.showAndWait();
    }
}
